<!DOCTYPE html>
<html>
 <head> 
  <meta charset="UTF-8" /> 
  <meta http-equiv="Cache-Control" content="max-age=60" /> 
  <meta http-equiv="Cache-Control" content="no-siteapp" /> 
  <meta http-equiv="Cache-Control" content="no-transform" /> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 
  <meta name="renderer" content="webkit" /> 
  <meta name="viewport" content="initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> 
  <meta name="apple-mobile-web-app-title" content="{$maccms.site_name}" /> 
  <title>修改资料 - 个人中心 - {$maccms.site_name}</title> 
  <meta name="keywords" content="个人中心,{$maccms.site_keywords}" /> 
  <meta name="description" content="{$maccms.site_description}" />
  <!-- Favicon Icon --> 
  <link rel="icon" type="image/png" href="{$maccms.path_tpl}html/style/images/favicon.png" /> 
  <!-- Bootstrap core CSS--> 
  <link href="{$maccms.path_tpl}html/style/css/bootstrap.min.css" rel="stylesheet" /> 
  <!-- Custom fonts for this template--> 
  <link href="{$maccms.path_tpl}html/style/css/all.min.css" rel="stylesheet" type="text/css" /> 
  <!-- Custom styles for this template--> 
  <link href="{$maccms.path_tpl}html/style/css/osahan.css" rel="stylesheet" /> 
  <!-- Owl Carousel --> 
  <link rel="stylesheet" href="{$maccms.path_tpl}html/style/css/owl.carousel.css" /> 
  <link rel="stylesheet" href="{$maccms.path_tpl}html/style/css/owl.theme.css" /> 
  <link href="{$maccms.path_tpl}html/style/css/sweetalert.css" rel="stylesheet" type="text/css" /> 
  <script src="{$maccms.path_tpl}html/style/js/sweetalert.min.js" type="text/javascript"></script> 
  <script src="{$maccms.path_tpl}html/style/js/jquery.min.js"></script> 
  <script src="{$maccms.path_tpl}html/style/js/jquery.lazyload.min.js"></script> 
  {include file="user/include"}  
    <style>
        .sidebar .nav-item .dropdown-menu{
            top: -100%!important;
        }
        .shadow_border{border: 1px solid #000;padding: 60px; width:100px;
            -webkit-border-radius: 8px;
            -moz-border-radius: 8px;
            border-radius: 8px;
            -webkit-box-shadow: #666 0px 0px 10px;
            -moz-box-shadow: #666 0px 0px 10px;
            box-shadow: #666 0px 0px 10px;}


        .shadow_font{text-shadow: #f00 3px 3px 3px;}

        .nav_new{
            position: fixed;

            z-index: 99;
            width: 100%;
        }
        .ui-fix-top{
            position: fixed;
            left:0;
            right:0;
            top:0
        }
        .ui-wrapper{
            margin-top: 58px;
        }
        .ui-slide-block-pc,.ui-slide-block-pc-down2{
            background: linear-gradient(123deg, #ff516b 0%,#8876ea 100%);
            display: none;
            /*position: sticky;*/
            position: fixed;
            z-index: 100;
            margin-left: 14.1rem;
            border-bottom:5px solid #ffbfef;
            border-right:5px solid #ffbfef;
            /*border-left:5px solid #ffbfef;*/
        }


         .ui-slide-block-pc td,.ui-slide-block-pc-down2 td{
             width: 120px;
             font-size: 14px;
             line-height: 25px !important;
         }

        .ui-slide-block-pc-down{
            background: linear-gradient(123deg, #69dccc 0%,#5b4baf 100%);
            display: none;
            /*position: sticky;*/
            position: fixed;
            z-index: 100;
            margin-left: 14.1rem;
            border-bottom:5px solid #a8f7ee;
            border-right:5px solid #a8f7ee;
            /*border-left:5px solid #ffbfef;*/
        }

        .ui-slide-block-pc-down td{
            width: 120px;
            font-size: 14px;
            line-height: 25px !important;
        }

        .ui-slide-block{
            background: linear-gradient(123deg, #ff516b 0%,#8876ea 100%);
            display: none;
            position: sticky;
            position: fixed;
            z-index: 100;
        }

        .no-border{
            border-top: 0px solid #dee2e6 !important;
        }


    </style>  
 </head>
 <body id="page-top" class="fed-min-width">
  {include file="user/head"}
  <div class="fed-main-info fed-min-width"> 
   <div class="fed-part-case"> 
    <div class="fed-user-head fed-margin-top fed-back-whits"> 
     <div class="fed-list-pics fed-lazy fed-part-5by2 fed-part-rows" style="background:url({$maccms.path_tpl}html/style/images/user.jpg);"> 
      <div class="fed-part-core fed-text-center"> 
       <div class="fed-user-image" data-role="{:mac_url('user/portrait')}"> 
        <img class="face fed-user-avat fed-part-roun" src="{$obj.user_portrait|mac_default='static/images/touxiang.png'|mac_url_img}?v={:time()}" /> 
       </div> 
       <span class="fed-visible fed-text-white fed-padding">{$obj.user_name}</span> 
      </div> 
     </div> 
     <div class="fed-padding fed-part-rows fed-back-whits fed-hide-md"> 
      <ul class="fed-user-brief fed-part-rows fed-back-whits"> 
       <li class="fed-padding-x fed-text-center fed-col-xs4"> <span class="fed-visible fed-text-gules">{$obj.user_points}</span> <span class="fed-visible">我的积分</span> </li> 
       <li class="fed-padding-x fed-text-center fed-line-left fed-col-xs4"> <span class="fed-visible fed-text-gules">{$obj.group.group_name}</span> <span class="fed-visible">我的等级</span> </li> 
       <li class="fed-padding-x fed-text-center fed-line-left fed-col-xs4"> <span class="fed-visible fed-text-gules">{$obj.user_login_num}</span> <span class="fed-visible">登录次数</span> </li> 
      </ul> 
     </div> 
    </div> 
    <div class="fed-part-rows"> 
     <div class="fed-main-left fed-col-xs12 fed-col-md4 fed-col-lg3 fed-hide-xs fed-hide-sm fed-show-md-block">
       {include file="user/menu"} 
     </div> 
     <div class="fed-main-right fed-col-xs12 fed-col-md8 fed-col-lg9"> 
      <div class="fed-part-layout fed-back-whits"> 
       <div class="fed-user-title fed-list-head fed-part-rows fed-padding fed-line-bottom"> 
        <h2 class="fed-font-xvi fed-padding">修改资料</h2> 
        <ul class="fed-part-tips fed-padding"> 
         <li class="fed-padding"> <a class="fed-more" href="{:mac_url('user/index')}">返回</a> </li> 
        </ul> 
       </div> 
       <form class="fed-user-form fed-user-info fed-part-rows" id="fm" name="fm" method="post" action=""> 
        <ul class="fed-user-list fed-part-rows fed-back-whits"> 
         <li class="fed-padding-x fed-part-rows fed-line-bottom"> 
          <div class="fed-user-input fed-visible fed-font-xvi fed-part-rows"> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone">用户名</span> 
           <span class="fed-col-xs7 fed-col-sm6 fed-part-eone">{$obj.user_name}</span> 
           <span class="fed-col-xs1 fed-col-sm3 fed-part-eone fed-text-right"><i class="fed-icon-font fed-icon-you"></i></span> 
          </div> </li> 
         <li class="fed-padding-x fed-part-rows fed-line-bottom"> 
          <div class="fed-user-input fed-visible fed-font-xvi fed-part-rows"> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone">原密码</span> 
           <span class="fed-col-xs4 fed-col-sm6 fed-part-eone"><input type="password" name="user_pwd" placeholder="原密码" maxlength="20" /></span> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone fed-text-right"><span class="fed-user-tips fed-text-gules">＊</span></span> 
          </div> </li> 
         <li class="fed-padding-x fed-part-rows fed-line-bottom"> 
          <div class="fed-user-input fed-visible fed-font-xvi fed-part-rows"> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone">新密码</span> 
           <span class="fed-col-xs7 fed-col-sm6 fed-part-eone"><input type="password" name="user_pwd1" placeholder="新密码" maxlength="20" /></span> 
           <span class="fed-col-xs1 fed-col-sm3 fed-part-eone fed-text-right"><i class="fed-icon-font fed-icon-you"></i></span> 
          </div> </li> 
         <li class="fed-padding-x fed-part-rows fed-line-bottom"> 
          <div class="fed-user-input fed-visible fed-font-xvi fed-part-rows"> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone">重复密码</span> 
           <span class="fed-col-xs7 fed-col-sm6 fed-part-eone"><input type="password" name="user_pwd2" placeholder="重复密码" maxlength="20" /></span> 
           <span class="fed-col-xs1 fed-col-sm3 fed-part-eone fed-text-right"><i class="fed-icon-font fed-icon-you"></i></span> 
          </div> </li> 
         <li class="fed-padding-x fed-part-rows fed-line-bottom"> 
          <div class="fed-user-input fed-visible fed-font-xvi fed-part-rows"> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone">QQ号码</span> 
           <span class="fed-col-xs7 fed-col-sm6 fed-part-eone"><input type="text" name="user_qq" value="{$obj.user_qq}" placeholder="QQ号码" /></span> 
           <span class="fed-col-xs1 fed-col-sm3 fed-part-eone fed-text-right"><i class="fed-icon-font fed-icon-you"></i></span> 
          </div> </li> 
         <li class="fed-padding-x fed-part-rows fed-line-bottom"> 
          <div class="fed-user-input fed-visible fed-font-xvi fed-part-rows"> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone">邮件地址</span> 
           <span class="fed-col-xs6 fed-col-sm6 fed-part-eone"><input type="email" name="user_email" value="{$obj.user_email}" placeholder="邮件地址" /></span> 
           <span class="fed-col-xs2 fed-col-sm3 fed-part-eone fed-text-right">{if$obj.user_email==''}<a href="{:mac_url('user/bind')}?ac=email">绑定</a>{else}<a class="fed-user-unnd btn_unbind" ac="email" href="javascript:;">解绑</a>{/if}</span> 
          </div> </li> 
         <li class="fed-padding-x fed-part-rows fed-line-bottom"> 
          <div class="fed-user-input fed-visible fed-font-xvi fed-part-rows"> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone">联系手机</span> 
           <span class="fed-col-xs6 fed-col-sm6 fed-part-eone"><input type="tel" name="user_phone" value="{$obj.user_phone}" placeholder="联系手机" /></span> 
           <span class="fed-col-xs2 fed-col-sm3 fed-part-eone fed-text-right">{if$obj.user_phone==''}<a href="{:mac_url('user/bind')}?ac=phone">绑定</a>{else}<a class="fed-user-unnd btn_unbind" ac="phone" href="javascript:;">解绑</a>{/if}</span> 
          </div> </li> 
         <li class="fed-padding-x fed-part-rows fed-line-bottom"> 
          <div class="fed-user-input fed-visible fed-font-xvi fed-part-rows"> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone">密码问题</span> 
           <span class="fed-col-xs7 fed-col-sm6 fed-part-eone"><input type="text" name="user_question" value="{$obj.user_question}" placeholder="找回密码问题" /></span> 
           <span class="fed-col-xs1 fed-col-sm3 fed-part-eone fed-text-right"><i class="fed-icon-font fed-icon-you"></i></span> 
          </div> </li> 
         <li class="fed-padding-x fed-part-rows fed-line-bottom"> 
          <div class="fed-user-input fed-visible fed-font-xvi fed-part-rows"> 
           <span class="fed-col-xs4 fed-col-sm3 fed-part-eone">密码答案</span> 
           <span class="fed-col-xs7 fed-col-sm6 fed-part-eone"><input type="text" name="user_answer" value="{$obj.user_answer}" placeholder="找回密码答案" size="40" /></span> 
           <span class="fed-col-xs1 fed-col-sm3 fed-part-eone fed-text-right"><i class="fed-icon-font fed-icon-you"></i></span> 
          </div> </li> 
         <li class="fed-padding-x fed-part-rows"> <span class="fed-col-xs4 fed-col-sm3 fed-part-eone fed-hide-xs">&nbsp;</span> <input class="fed-subm-infos fed-col-xs7 fed-col-sm6 fed-rims-info fed-btns-info fed-btns-green fed-col-xs12" type="button" id="btn_submit" value="保存" /> </li> 
        </ul> 
       </form> 
      </div> 
     </div> 
    </div> 
   </div> 
  </div> 
  {include file="user/foot"}
  <script>

	$('.btn_unbind').click(function(){
		var ac = $(this).attr('ac');
		if(ac!='email' && ac!='phone'){
			alert('参数错误');
		}
		if(confirm('确认解除绑定吗？此操作不可恢复？')) {
			$.ajax({
				url: "{:url('user/unbind')}",
				type: "post",
				dataType: "json",
				data: {ac: ac},
				beforeSend: function () {
					//开启loading
				},
				success: function (r) {
					alert(r.msg);
					if(r.code==1){
						location.href="{:url('user/info')}";
					}
				},
				complete: function () {
					//结束loading
				}
			});
		}
	});

	$("#btn_submit").click(function() {
		var data = $("#fm").serialize();
		$.ajax({
			url: "{:url('user/info')}",
			type: "post",
			dataType: "json",
			data: data,
			beforeSend: function () {
				//开启loading
				//$(".loading_box").css("display","block");
				$("#btn_submit").val("loading...");
			},
			success: function (r) {
				alert(r.msg);
				if(r.code==1){
					location.href="{:url('user/info')}";
				}
			},
			complete: function () {
				//结束loading
				//$(".loading_box").css("display","none");
				$("#btn_submit").val("提交");
			}
		});
	});
	
	$(".face").imageUpload({
		formAction: "{:url('user/portrait')}",
		inputFileName:'file',
		browseButtonValue: '',
		browseButtonClass:'btn btn-default btn-xs fed-user-alter fed-part-roun fed-icon-font fed-icon-xiugai',
		automaticUpload: true,
		hideDeleteButton: true,
		hover:true
	})
	$(".jQuery-image-upload-controls").mouseenter(function(){
    $(".jQuery-image-upload-controls").css("display","block");
	});
	$(".jQuery-image-upload-controls").mouseleave(function(){
    $(".jQuery-image-upload-controls").css("display","none");
	});
	$(".face").on("imageUpload.uploadFailed", function (ev, err) {
		alert(err);
	});
</script>  
  <script src="{$maccms.path_tpl}html/style/js/bootstrap.bundle.min.js"></script> 
  <!-- Core plugin JavaScript--> 
  <script src="{$maccms.path_tpl}html/style/js/jquery.easing.min.js"></script> 
  <!-- Owl Carousel --> 
  <script src="{$maccms.path_tpl}html/style/js/owl.carousel.js"></script> 
  <!-- Custom scripts for all pages--> 
  <script src="{$maccms.path_tpl}html/style/js/custom.js"></script> 
  <script>

    $(document).on('click','#sidebarTogglePc',function (e) {
        e.preventDefault();
        $("#block-slide-pc").slideToggle("fast")
        if($("#block-slide-pc-down").is(":visible")){
            $("#block-slide-pc-down").slideToggle("fast")
        }
		if($("#block-slide-pc-down2").is(":visible")){
            $("#block-slide-pc-down2").slideToggle("fast")
        }


        // $("#block-slide-pc-down").slideToggle("fast")
    });
    $(document).on('click','#sidebarTogglePcDown',function (e) {
        e.preventDefault();
        $("#block-slide-pc-down").slideToggle("fast")
		if($("#block-slide-pc").is(":visible")){
            $("#block-slide-pc").slideToggle("fast")
        }
        if($("#block-slide-pc-down2").is(":visible")){
            $("#block-slide-pc-down2").slideToggle("fast")
        }


        // $("#block-slide-pc").slideToggle("fast")
    });
	$(document).on('click','#sidebarTogglePcDown2',function (e) {
        e.preventDefault();
        $("#block-slide-pc-down2").slideToggle("fast")
		if($("#block-slide-pc").is(":visible")){
            $("#block-slide-pc").slideToggle("fast")
        }
        if($("#block-slide-pc-down").is(":visible")){
            $("#block-slide-pc-down").slideToggle("fast")
        }

    });
    $(document).on('click','#sidebarTogglePcLeft',function (e) {
        e.preventDefault();
        $("#block-slide-pc").slideToggle("fast")
        if($("#block-slide-pc-down").is(":visible")){
            $("#block-slide-pc-down").slideToggle("fast")
        }
        if($("#block-slide-pc-down2").is(":visible")){
            $("#block-slide-pc-down2").slideToggle("fast")
        }

    });
    $(document).on('click','#sidebarTogglePcLeftDown',function (e) {
        e.preventDefault();
        $("#block-slide-pc-down").slideToggle("fast")
        if($("#block-slide-pc").is(":visible")){
            $("#block-slide-pc").slideToggle("fast")
        }
        if($("#block-slide-pc-down2").is(":visible")){
            $("#block-slide-pc-down2").slideToggle("fast")
        }

    });
    $(document).on('click','#sidebarTogglePcLeftDown2',function (e) {
        e.preventDefault();
        $("#block-slide-pc-down2").slideToggle("fast")
        if($("#block-slide-pc").is(":visible")){
            $("#block-slide-pc").slideToggle("fast")
        }
        if($("#block-slide-pc-down").is(":visible")){
            $("#block-slide-pc-down").slideToggle("fast")
        }

    });


    $(document).ready(function() {
        $("img.lazy").lazyload({
            effect : "fadeIn",
            threshold : 500
        });
        $("img.lazy1").lazyload({
            effect : "fadeIn",
            threshold : 500
        });

    });
</script> 
 </body>
</html>